package com.gitee.wsl.statemachine.action

import com.gitee.wsl.statemachine.trigger.ActionTriggerScope

typealias ActionHandler<A , State> = StateActionScope<A, State>.()->Unit

interface StateActionScope<A, State>{
    fun action(action: A, toState: State)

    fun action(action: A, toState: State,actionBlock: () -> Unit)

    fun action(pair: Pair<A,State>)

    fun action(pair: Pair<A, State>,actionBlock: () -> Unit)

    fun trigger(actionTrigger: ActionTriggerScope<State>.()->Unit)
}